package cn.flyboy.service.impl;

import cn.flyboy.entity.Information;
import cn.flyboy.mapper.InfoMapper;
import cn.flyboy.service.InfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class InfoServiceImpl implements InfoService {
    @Resource
    private InfoMapper infoMapper;

    @Override
    public int insertInfo(Information info) {
        return infoMapper.saveInfo(info);
    }

    @Override
    public List<Information> selectExamInfoOfTea(String t_name) {
        return infoMapper.selectExamInfoOfTea(t_name);
    }

    @Override
    public List<Information> getAllInfo() {
        return infoMapper.selectAllInfo();
    }

    @Override
    public List<Information> getAllExamInfo(String exam, String t_name) {
        return infoMapper.selectAllExamInfo(exam, t_name);
    }

    @Override
    public int delInfo(int id) {
        return infoMapper.delInfo(id);
    }
}
